{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "057d348e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dc15_a01_led_cap2_dummy.stl: Vertices = 11, Faces = 18\n",
      "square_joint.stl: Vertices = 10, Faces = 20\n",
      "dc15_a01_horn_idle2_dummy.stl: Vertices = 11, Faces = 20\n",
      "b3b_eh.stl: Vertices = 12, Faces = 20\n",
      "dc15_a01_case_b_dummy.stl: Vertices = 12, Faces = 20\n",
      "bts2_m2_6x8.stl: Vertices = 12, Faces = 20\n",
      "lamp_head.stl: Vertices = 11, Faces = 20\n",
      "dc15_a01_idle_cap_dummy.stl: Vertices = 11, Faces = 20\n",
      "arm_length_15cm.stl: Vertices = 14, Faces = 20\n",
      "arm_length_10cm.stl: Vertices = 13, Faces = 20\n",
      "dc15_a01_case_f_dummy.stl: Vertices = 10, Faces = 20\n",
      "base.stl: Vertices = 10, Faces = 20\n",
      "dc15_a01_case_m_dummy.stl: Vertices = 12, Faces = 20\n",
      "angle_joint.stl: Vertices = 9, Faces = 20\n",
      "dc15_a01_horn_dummy.stl: Vertices = 12, Faces = 20\n"
     ]
    }
   ],
   "source": [
    "import pymeshlab\n",
    "import os\n",
    "\n",
    "def list_stl_complexity(folder_path):\n",
    "    for filename in os.listdir(folder_path):\n",
    "        if filename.lower().endswith('.stl'):\n",
    "            filepath = os.path.join(folder_path, filename)\n",
    "            ms = pymeshlab.MeshSet()\n",
    "            ms.load_new_mesh(filepath)\n",
    "            \n",
    "            vertices = ms.current_mesh().vertex_number()\n",
    "            faces = ms.current_mesh().face_number()\n",
    "            \n",
    "            print(f\"{filename}: Vertices = {vertices}, Faces = {faces}\")\n",
    "\n",
    "# Replace with your STL folder path\n",
    "stl_folder = \"../models/lelamp/assets\"\n",
    "list_stl_complexity(stl_folder)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "mujoco",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
